import java.util.Scanner;

public class HomeWork09_04{
    public static void main(String[] args){
        GuessNumb gn = new GuessNumb();
        gn.guessNumb();
    }
}

class GuessNumb{
    public void guessNumb(){
        Scanner scan = new Scanner(System.in);
        
        int numb = (int)(Math.random()*99 + 1);
        int guess;
        System.out.print("请猜一个1~100的数字:");
        do
        {
            guess = scan.nextInt();
            if(guess < numb){
                System.out.println("小了");
            }else if(guess > numb){
                System.out.println("大了");
            }
        }while(guess != numb);
        
        System.out.println("猜对了！");
    }
}